home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / MacPerl 5.1.3 / Mac_Perl_513_src / MacPerl5 / MacPerl.Packages < prev    next >
Encoding:
Text File  |  1994-11-24  |  2.6 KB  |  68 lines  |  [TEXT/MPS ]

  1. Writing custom packaging options for MacPerl        Matthias Neeracher 24Nov94
  2.  
  3. Often, to be able to conveniently use MacPerl scripts to do a job, it helps
  4. to combine them with some glue code - e.g., for droplets. Starting with version
  5. 4.1.4, it is now possible to add custom packaging options to MacPerl. This file 
  6. describes how to specify them and their effects.
  7.  
  8. FORMAT OF MACPERL FILES
  9.  
  10. Every file saved by MacPerl 4.1.4 contains the following resources (most of these
  11. were also present in earlier versions):
  12.  
  13. 'TEXT' (128, "!")    The script itself, unless the file is a plain text file, in which 
  14.                         case the script will be saved in the resource fork.
  15. 'MrPL' (128)        The package ID. Currently defined package IDs are:
  16.         'TEXT'        A plain text file.
  17.         'SCPT'        A droplet.
  18.         'MrP7'        A system 7 runtime.
  19.         'MrP6'        A universal runtime.
  20.         'WWWΩ'        A MacHTTP CGI file.
  21.  
  22. 'TFSP' (255)        The printing setup for the file.
  23. 'TFSS' (255)        The font, size and rectangle for the file.
  24. 'STR ' (-16396)    The application name ("MacPerl")
  25.  
  26. Optionally:
  27.  
  28. 'McPo' (128)        A list of entries for all resources belonging to the packaging.
  29.                         These resources may be erased or overridden with each save.
  30. 'McPo' (129)        A list of entries for all resources that may not be overridden
  31.                         under any circumstances. The format of both lists is:
  32.     4 bytes            Resource type
  33.     2 bytes            Resource ID
  34.     
  35.                         The list is terminated by a (0,0) tuple.
  36.  
  37. PACKAGING OPTION DESCRIPTIONS
  38.  
  39. A packaging option is contained in a file of type 'McPp', creator 'McPL' contained
  40. in a folder "MacPerl Extensions" in either the MacPerl application folder or the
  41. Extensions folder. The following resources are required:
  42.  
  43. 'STR ' (32700)        The name of the packaging option to appear in the Save As… popup
  44.                         menu.
  45. 'McPp' (32700)     A packaging resource, consisting of
  46.     4 bytes            version number, currently '0100'
  47.     4 bytes            a package ID. To guarantee uniqueness, please register package
  48.                         IDs with me <neeri@iis.ee.ethz.ch>.
  49.     4 bytes            file type for script
  50.     4 bytes            file creator for script
  51.     4 bytes            flags. Currently only the two high order bits are defined:
  52.     
  53.                         Bit 31:
  54.                             1    Set bundle bit of created file
  55.                             0     Clear bundle bit
  56.                         
  57.                         Bit 30:
  58.                             1    Set custom icon bit of created file
  59.                             0    Clear custom bit
  60.  
  61. 'McPs' (32700)        A shopping list enumerating the resources to add to the saved file.
  62.                         This is a list of entries, each consisting of:
  63.     4 bytes            Resource type in package file
  64.     4 bytes            Resource type in saved file
  65.     2 bytes            Resource id in package file
  66.     2 bytes            Resource id in saved file
  67.     
  68.     This list has to be terminated by a (0,0,0,0) entry.